CREATE EXTERNAL TABLE jms_ods.`metadata_run` (
  `id`                 int                  comment '唯一id'
  ,`dag_id`             string               comment 'dag_id'
  ,`queued_at`          string               comment ''
  ,`execution_date`      string              comment '预计启动时间'
  ,`start_date`          string              comment '实际启动时间'
  ,`end_date`            string              comment '实际结束时间'
  ,`state`               string              comment '状态'
  ,`run_id`              string              comment 'run_id'
  ,`creating_job_id`      int                comment '创建的job_id'
  ,`external_trigger`      int               comment '额外的触发'
  ,`run_type`             string             comment 'run_type'
  ,`conf`                 string             comment 'conf'
  ,`data_interval_start`   string            comment ''
  ,`data_interval_end`       string          comment ''
  ,`last_scheduling_decision` string         comment ''
  ,`dag_hash`                 string         comment ''
  ,`log_template_id`           int           comment ''
  ,`updated_at`                string        comment ''
) COMMENT 'airflow 中dag_run表数据'
PARTITIONED BY (
  `dt` string COMMENT '创建日期 (yyyy-MM-dd)')
stored as parquet
location '/dw/hive/jms_ods.db/external/metadata_run'